<include file="Public:wapheader" />
		<div class="page3">
			<form id="info_form" action="{:U('Used/save')}" method="post" enctype="multipart/form-data">
			<div class="mainner">
				<div class="title">
					<ul>
						<li class="on">物业地址</li>
						<li class="on">基本信息</li>
						<li>完成</li>
					</ul>
				</div>
				<div class="cont">
					<div class="table1">
						<p><b>基本信息</b></p>
						<p><label>户型</label>
							<span>
							    <input type="text" name="used_type" value="{$dict.chamber}-{$dict.hall}-{$dict.kitchen}-{$dict.toilet}" readonly/>
                                <input type="hidden" name="id" value="{$used.id}"/>
							</span>
						</p>
                        <p>
                            <label>户型图</label>
                            <span style="width:60%"><input type="file" name="img" id="img"  /></span>
                        </p>
						<p>
                            <label>朝向</label>
                            <span>
							<select name="aspect">
								<option value="10" <if condition="$dict['aspect'] eq 10">selected</if> >西北</option>
                                <option value="9" <if condition="$dict['aspect'] eq 9">selected</if> >西南</option>
                                <option value="8" <if condition="$dict['aspect'] eq 8">selected</if> >东北</option>
                                <option value="7" <if condition="$dict['aspect'] eq 7">selected</if> >东南</option>
                                <option value="6" <if condition="$dict['aspect'] eq 6">selected</if> >南北</option>
                                <option value="5" <if condition="$dict['aspect'] eq 5">selected</if> >东西</option>
                                <option value="4"  <if condition="$dict['aspect'] eq 4">selected</if>  >北</option>
                                <option value="3" <if condition="$dict['aspect'] eq 3">selected</if> >南</option>
                                <option value="2" <if condition="$dict['aspect'] eq 2">selected</if> >西</option>
                                <option value="1" <if condition="$dict['aspect'] eq 1">selected</if> >东</option>
							</select>
						    </span>
                        </p>
                        <p><label>房屋编号</label><span> <input type="text" name="encoded" id="encoded"> </span></p>
                        <p><label>产权</label><span>
							<select name="property" id="property">
                                <option value="0" selected="">请选择</option>
                                <option value="15">红本五年一套</option>
                                <option value="16">红本两年多套</option>
                                <option value="17">贷款五年一套</option>
                                <option value="18">贷款两年多套</option>
                                <option value="19">贷款不满两年</option>
                                <option value="21">红本不满两年</option>
                                <option value="12">红本在手</option>
                                <option value="13">抵押</option>
                                <option value="14">查封</option>
                                <option value="1">个人产权</option>
                                <option value="20">公司产权</option>
                                <option value="2">商品房</option>
                                <option value="3">微利房</option>
                                <option value="4">军产房</option>
                                <option value="5">集资房</option>
                                <option value="6">农民房</option>
                                <option value="7">福利房</option>
                                <option value="8">使用权</option>
                                <option value="9">单位产权</option>
                                <option value="10">经济适用房</option>
                                <option value="11">房改房</option>
                            </select>
						</span></p>
						<p><label>面积</label><span><input type="text" value="{$dict.area}" />㎡</span></p>
						<p><label>价格</label><span><input id="price" type="text" placeholder="请输入" />万元</span></p>
                        <p>
                            <label>装修情况：</label><span>
                            <input type="radio" name="decorate" id="renovation_type70" value="4"><label for="renovation_type70">豪装</label>
                            <input type="radio" name="decorate" id="renovation_type68" value="3"><label for="renovation_type68">精装</label>
                            <input type="radio" name="decorate" id="renovation_type67" value="2"><label for="renovation_type67">简装</label>
                            <input type="radio" name="decorate" id="renovation_type69" value="1"><label for="renovation_type69">毛坯</label>
                        </span></p>
					</div>
					
					<div class="table2">
						<p><label>姓名</label><span> <input type="text" name="contacts" id="name" placeholder="请输入" /> </span></p>
						<p><label>手机<font> (必选)</font></label><span> <input id="tel" type="text" name="phone" placeholder="请输入" class="ismobile"/> </span></p>
                        <p><label>身份证</label><span> <input type="text" name="id_card" id="id_code" placeholder="请输入" /> </span></p>
                        <p><label>手机<font> (可选)</font></label><span> <input id="tel1" type="text" name="phone1" /> </span></p>
                        <p><label>手机<font> (可选)</font></label><span> <input id="tel2" type="text" name="phone2" /> </span></p>
                        <p><label>手机<font> (可选)</font></label><span> <input id="tel3" type="text" name="phone3" /> </span></p>
					</div>

                    <div class="table2">
                        <p><label>建筑年代</label><span> <input type="text" name="years" id="years" value="{$estate.years}" placeholder="请输入" />年</span></p>
                        <p><label>地图标志</label><span> <input type="text" name="map" id="map" value="{$estate.map}" placeholder="请输入" /> </span></p>
                    </div>

                    <div class="btn">
                        <a href="javascript:history.go(-1);">上一步</a>
                        <input type="submit" value="提交" class="btn_ok">
                    </div>
				</div>
			</div>
            </form>
		</div>
	</body>
<script src="__S__/js/ajaxfileupload.js"></script>
<script src="__S__/js/jquery.validate.js"></script>
<script src="__S__/js/magess.js"></script>
<script src="__S__/js/jquery.metadata.js"></script>
<script type="text/javascript">
    $().ready(function() {
        $("#info_form").validate();
        jQuery.validator.addMethod("ismobile", function(value, element) {
            var length = value.length;
            var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
            return this.optional(element) || (length == 11 && mobile.test(value));
        }, "请正确填写您的手机号码");
    });

</script>
<script>
	$('input[name=used_type]').click(function (){
		layer.open({
			type: 1,
			title: '请选择',
			area: ['80%', '300px'],
			content: '<div><div style="margin: 0 auto;text-align:center"><ul id="u-type">' +
			'<li style="padding: 10px 10px"><label style="margin-right: 20px">室</label><input class="editbox" type="number" name="chamber" min="0" style="height: 30px"></li>' +
			'<li style="padding: 10px 10px"><label style="margin-right: 20px">厅</label><input class="editbox" type="number" name="hall" min="0" style="height: 30px"></li>' +
			'<li style="padding: 10px 10px"><label style="margin-right: 20px">厨</label><input class="editbox" type="number" name="kitchen" min="0" style="height: 30px"</li>' +
			'<li style="padding: 10px 10px"><label style="margin-right: 20px">卫</label><input class="editbox" type="number" name="toilet" min="0" style="height: 30px"></li>' +
			'</ul><button class="greenbuttoncss" onclick="addType (this)">确定</button></div></div>'
		});
	});
	function addType (tar){
		var chamber = $('input[name=chamber]').val()?$('input[name=chamber]').val():1;
		var hall = $('input[name=hall]').val()?$('input[name=hall]').val():0;
		var kitchen = $('input[name=kitchen]').val()?$('input[name=kitchen]').val():0;
		var toilet = $('input[name=toilet]').val()?$('input[name=toilet]').val():0;
		$('input[name=used_type]').prop ('value', chamber+'-'+hall+'-'+kitchen+'-'+toilet);
		layer.closeAll();
	}
</script>
</html>
